package com.visualexpress.messager;

import java.util.ArrayList;
import java.util.Date;

import com.visualexpress.dao.MessageDAO;
import com.visualexpress.domain.Location;
import com.visualexpress.domain.Shipment;
import com.visualexpress.domain.User;

public class ShipmentAdapter {
	private MessageDAO dao;
	private Shipment shipment;
	//public public ArrayList<Location> getLocations

	
	
	private ShipmentAdapter(MessageDAO dao, Shipment shipment) {
		super();
		this.dao = dao;
		this.shipment = shipment;
	}

	public static ShipmentAdapter createShipmentAdapter(Shipment sm)
	{
		MessageDAO dao = new MessageDAO();
		return new ShipmentAdapter(dao,sm);
	}

	public ArrayList<User> getAllRelatedUsers() {
		return dao.getAllRelatedUsers(shipment);
	}

	public ArrayList<Date> getArrivalTimes() {
		return dao.getArrivalTimes(shipment);
	}

	public ArrayList<Date> getLeaveTimes() {
		return dao.getLeaveTimes(shipment);
	}

	public ArrayList<Location> getLocations() {
		return dao.getLocations(shipment);
	}

	public Location getEndLocation() {
		return shipment.getEndLocation();
	}

	public String getId() {
		return shipment.getId();
	}

	public boolean getIsCounted() {
		return shipment.getIsCounted();
	}

	public String getShipmentNum() {
		return shipment.getShipmentNum();
	}

	public Location getStartLocation() {
		return shipment.getStartLocation();
	}

	public boolean getState() {
		return shipment.getState();
	}

	public Long getUsetime() {
		return shipment.getUsetime();
	}

	public void setEndLocation(Location endLocation) {
		shipment.setEndLocation(endLocation);
	}

	public void setId(String id) {
		shipment.setId(id);
	}

	public void setIsCounted(boolean isCounted) {
		shipment.setIsCounted(isCounted);
	}

	public void setShipmentNum(String shipmentNum) {
		shipment.setShipmentNum(shipmentNum);
	}

	public void setStartLocation(Location startLocation) {
		shipment.setStartLocation(startLocation);
	}

	public void setState(boolean state) {
		shipment.setState(state);
	}

	public void setUsetime(Long usetime) {
		shipment.setUsetime(usetime);
	}
	
}
